using System;
using System.Collections.Generic;
using System.Drawing;
using System.Windows.Forms;
using System.Threading;
using System.IO;

namespace Tewux.Peer2Image
{
	public partial class MainForm : Form
	{
		Engine engine;
		Settings settings;

		public MainForm()
		{
			InitializeComponent();
		}

		private void btnBrowse_Click(object sender, EventArgs e)
		{
			if (openFileDialog1.ShowDialog() == DialogResult.OK)
			{
				engine = new Engine(openFileDialog1.FileName, settings, txtLog);
				btnToImage.Enabled = true;
			}
			//this.Location.X = 200;
		}

		private void btnToImage_Click(object sender, EventArgs e)
		{
			if (engine != null && File.Exists(engine.filename))
				engine.File2Bmp();
		}
	}
}
